1. Field of Invention
The present invention relates to an update data transmission method for sending data from a computer to a peripheral device for updating the firmware (program) in the peripheral device, and to an update data transmission program for causing a computer to execute the update data transmission method. The invention also relates to a firmware writing system including a computer that sends firmware update data to a peripheral device and the peripheral device that rewrites its firmware based on firmware update data received from the computer. The invention also relates to a host device using the firmware writing system and method.
2. Description of Related Art
Printers and other modern peripheral devices commonly store the device's firmware in flash memory so that the firmware can be easily updated. JP-A-2005-63050, for example, teaches a method of updating firmware by receiving data for updating a control program from an external device, and using a writing program stored in a second storage area in flash memory to update the control program stored in a first storage area in flash memory with the received update data. If the peripheral device is connected to a network, the firmware update data can be received from the computer over the network to update the firmware.
The computer sends the firmware update data for the peripheral device to the peripheral device using a known format such as the Motorola (R) S3 format. The Motorola S3 format writes the compiled source code written in a programming language in a hexadecimal text file, and includes a management data part containing the data storage address, for example, and the object data (see FIG. 2A). The Motorola S3 format uses two letters to express one byte of data. The peripheral device converts the received text data from the Motorola S3 format (referred to below as the S3 ASCII format) to binary data, and writes the binary data to flash memory. The update data is thus written in a prescribed format such as the Motorola S3 format, and is sent and received in record (packet) units.
JP-A-2000-134230 teaches a method of generating the transmission packets by segmenting the available storage area in RAM, for example, into a header area where the header is stored and a data area where the data is stored, and linking the header stored in the header area to the data stored in the data area by a hardware operation that outputs the transmission packets.
Increased functionality in the peripheral devices has also increased the size of the firmware, which has increased the number of records (the number of data units) that are sent and received when the firmware is updated. Sending and receiving large amounts of update data is not particularly a problem when a high speed communication interface such as USB, a parallel interface, or Ethernet (R) connects the computer and the peripheral device, but sending the update data can take a long time if an RS-232C or other low speed communication interface is used. Sending 6 MB of data at 19,200 bps, for example, takes approximately 45 minutes, and at 9600 bps takes approximately 90 minutes. In addition, the peripheral device usually cannot be used while the firmware update data is being received, and completing the data transmission in the shortest possible time is therefore particularly desirable in any situation where the peripheral devices are normally used 24 hours a day.
JP-A-H11-212908 addresses this problem by teaching an interface box for temporarily storing in memory data received from a computer using an RS-232C (9600 bps, for example) interface, and then transferring the data from memory to a mobile information device using a faster (such as 50,000 bps) serial or parallel interface. The mobile information device can thus reduce the time that is required for data communication.
The communication time can also be shortened by reducing the amount of transferred data. JP-A-H06-242894, for example, teaches a method of counting the number of consecutive values representing a blank character (0x20) in the print data to be sent to the printer, and if this number is greater than or equal to a prescribed reference value, sending control data instead of the consecutive blank characters to move the printing position (print head) of the printer in one step a distance equal to the number of consecutive blanks.
A problem with the technology taught in JP-A-H11-212908, however, is that in addition to requiring an interface box, the peripheral device must also be made compatible with the interface box, and the interface box is thus lacking in general applicability. Furthermore, because the data transfer rate between the computer and the interface box is the bottleneck, the update data communication time is not shortened from the perspective of the overall system.